#include "Day.h"
#include <vector>
using namespace std;
//
// Class Diary
// represents an diary for one week, 
// holds the days of a week	
//

class Diary{
public:
	Diary();
	~Diary();
	Diary(const Diary& d);
	Diary& operator=(const Diary& d);
	
	// add new appointment 
	virtual bool makeAppointment(day_t day,hour startHour, hour endHour, string& subject);
	
	// remove exsisting appointment
	virtual void removeAppointment(day_t day,hour startHour);
	
	// find appointment
	virtual Appointment* findAppointment(day_t day,hour startHour) const;
	
	// move exsisting appointment to a different day and/or time
	virtual bool moveAppointment(day_t fromDay, hour startHour,day_t toDay ,hour newStartHour);

	// move exsisting appointment to a different day and/or time
	virtual bool copyAppointment(day_t fromDay, hour startHour,day_t toDay ,hour newStartHour);

	// find the first appointment of a day
	virtual Appointment* firstAppointment(day_t day) const;

	friend ostream& operator<<(ostream& os, const Diary& d);
private:
	vector<Day> week;
};

// overloaded operator << for Diary
ostream& operator<<(ostream& os, const Diary& d);